package com.wyc.apiPassenger.service.impl;

import com.wyc.apiPassenger.feign.ServicePriceFeignClient;
import com.wyc.apiPassenger.service.ForecastPriceService;
import com.wyc.internalCommon.request.ForecastPriceDTO;
import com.wyc.internalCommon.response.ForecastPriceResponse;
import com.wyc.internalCommon.result.ApiResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class ForecastPriceServiceImpl implements ForecastPriceService {

    @Autowired
    private ServicePriceFeignClient priceFeignClient;

    /**
     * 预估价格
     * @return
     */
    @Override
    public ApiResult<ForecastPriceResponse> forecastPrice(ForecastPriceDTO forecastPriceDTO) {
        // 调用计价服务，计算价格
        return priceFeignClient.forecastPrice(forecastPriceDTO);
    }

}
